<template>
  <div>
    <header>
      <img src="../../assets/header.jpg" v-if="!isLogin" @click="viewImage" />
      <img src="../../assets/logo.png" v-else @click="viewImage" />
      <span @click="goLogin">登录 / 注册</span>
    </header>
    <body>
      <div class="content">
        <van-cell-group>
          <van-cell
            title="我的关注"
            v-for="item in 6"
            :key="item"
            value="内容"
            size="large"
          />
        </van-cell-group>
      </div>
    </body>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isLogin: true,
    };
  },
  methods: {
    goLogin() {
      this.$router.push({
        name: "GoLogin",
      });
    },
    viewImage() {
      this.ImagePreview(["https://img01.yzcdn.cn/vant/apple-2.jpg"]);
    },
  },
};
</script>

<style scoped lang="less">
header {
  height: 3.6667rem;
  width: 100%;
  background-image: url("../../assets/bck-download.png");
  background-size: 100% 100%;
  color: #fec1be;
  img {
    width: 1.3333rem;
    height: 1.3333rem;
    border-radius: 0.6667rem;
    margin-top: 1.3333rem;
    margin-left: 0.5333rem;
  }
  span {
    font-size: 0.4267rem;
    margin: 0px 0.1333rem;
    text-decoration: underline;
  }
}
body {
  .content {
    margin-top: -10px;
    border-radius: 10px 10px 0px 0px;
    background-color: rebeccapurple;
    overflow: hidden;
    .van-cell-group {
      background-color: #fd1206;
      .van-cell {
        background-color: #ffdddb;
      }
    }
  }
}
</style>